import Vue from 'vue'
import App from './App.vue'
import router from './router'
import 'lib-flexible'
import packedAxios from "./utils/axios";
import store from './store/store.js'
import YDUI from 'vue-ydui'; /* 相当于import YDUI from 'vue-ydui/ydui.rem.js' */
import 'vue-ydui/dist/ydui.rem.css';
import VCharts from 'v-charts'
Vue.use(packedAxios); //使用this.$http代替封装好的axios
Vue.use(YDUI);
Vue.use(VCharts)
import axios from 'axios'
import Qs from 'qs'
import './assets/css/iconfont.css'

//QS是axios库中带的，不需要我们再npm安装一个

Vue.prototype.axios = axios;
Vue.prototype.qs = Qs;

// 定义全局函数
Vue.prototype.inputBack = function () {
  setTimeout(() => {
    const scrollHeight = document.documentElement.scrollTop || document.body.scrollTop || 0;
    window.scrollTo(0, Math.max(scrollHeight - 1, 0));
  }, 100);
}

Vue.config.productionTip = false

new Vue({
  store,
  router,
  render: h => h(App)
}).$mount('#app')
